package com.lyf.boot.modules.index.controller;

import com.lyf.boot.core.model.R;
import com.lyf.boot.modules.index.entity.vo.ProfileVo;
import com.lyf.boot.modules.index.service.IProfileService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 个人中心接口
 * @author Luyufan
 * @date 2023/12/28 17:42
 **/
@RestController
@RequestMapping("/profile")
@RequiredArgsConstructor
public class ProfileController {

    private final IProfileService profileService;


    /**
     * 查询个人信息
     * @return
     */
    @PostMapping("/info")
    public R<ProfileVo> getProfile(){
        return R.ok(profileService.getProfile());
    }
}
